import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

//引入 nprogress
// import NProgress from 'nprogress' //进度条
import  'nprogress/nprogress.css'

//默认路由
import shared from './modules/shared'

import {errorRoutes,notFound} from './modules/error'
import common from '@/router/common';

export const routes: Array<RouteRecordRaw> = [
  {
    path:'/',
    name:'Layout',
    redirect:'/dashboard',
    component:()=>import('@/layout/index.vue'),
    meta:{
      title:'首页'
    },
    children:[
        ...common
    ]
  },
    ...shared,
    errorRoutes,
];

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
